/*
 * @Author: Bennty
 * @Date: 2024-08-29 09:22:46
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-09-11 09:53:34
 * @Description: 请填写简介
 */
import request from '@/utils/request';

/** 查询客户跟进信息表 */
export const getFollowRecordApi = ()=>{
    return request({
        url: '/system/customerFollow/list',
        method: 'post'
    })
};

/** 新增客户跟进信息 */
export const addFollowRecordApi = (data:any)=>{
    return request({
        url: '/system/customerFollow',
        method: 'post',
        data: data
    })
};

/** 根据客户编号查询跟进信息列表 */
export const getFollowRecordByIdApi = (id: string | number | undefined)=>{
    return request({
        url: '/system/customerFollow/getFellowByCustomerId',
        method: 'get',
        params: {customerId: id}
    })
};

/** 删除跟进信息 */
export const deleteFollowRecordApi = (id: string | number) => {
    return request({
        url: '/system/customerFollow/removeById',
        method: 'delete',
        params: {id: id}
    })
}

/** 提交跟进评论 */
export const addFollowCommentApi = (data: any) => {
    return request({
        url: '/system/followComment',
        method: 'post',
        data: data
    })
}

/** 获取评论列表 */
export const getFollowRecordsApi = (id: string | number) => {
    return request({
        url: '/system/followComment/getListByFollowId',
        method: 'get',
        params: {followId: id}
    })
};

/** 根据客户编号查询客户相关操作记录 */
export const getOperationByCustomerIdApi = (id: string | number) => {
    return request({
        url: '/system/customerOperationRecord/getOperationRecordByCustomerId',
        method: 'get',
        params: {customerId: id}
    })
};